export default function checkFileType(name, accept) {
  var type = name.slice(name.lastIndexOf('.') + 1);
  if (typeof accept === 'object') {
    return accept.some(s => s === type);
  } else if (typeof accept === 'string') {
    return accept === type;
  }
}
